﻿
Public Class posterViewer
    Inherits webctrl.posterViewer

    Public Const pvCssFile As String = "pv.css"
    Private Shared inlineCss As String = Nothing

    Private Shared Sub readcss()
        inlineCss = cssrequest.readcss(pvCssFile)
    End Sub

    Shared Sub New()
        readcss()
    End Sub

    Public Shadows Sub setData(ByVal ds As datasource)
        assert(Not ds Is Nothing)
        If isdebugmode() Then
            readcss()
        End If
        If Not isemptystring(inlineCss) AndAlso _
           Not ds.page Is Nothing AndAlso Not ds.page.inlineScript() Is Nothing Then
            ds.page.inlineStyle().addstyle("posterViewer.inlineCss", inlineCss)
        End If
        MyBase.setData(ds)
    End Sub
End Class
